<?php
/*
 * This form allows the user to select the area they wish to interact with in the case of
 * the user being linked to more than one area
 * Called from security.php :: setarea
 */
  
echo '<div id="contentfull">';
echo '<div id="login">';

echo '<a href="'.$baseurl.'index.php/logout"><img class="btnimg" src="'.$baseurl.'public/images/close.png" align="right" alt="close" border="0" /></a>';
echo form_open($baseurl.'index.php/setarea/', '');
echo form_fieldset('<h2>Select Area</h2>');

//var_dump($property);
?>
<table>
   <tr>
     <td> <?php echo form_label('Area', 'areaset');  $level = array('name' => 'areaset', 'id' => 'areaset' );
         $options = [];
         $options = array_merge($options, array('0' => 'Please select '));
         //var_dump($areas);
         foreach($areas as $value)
            {   var_dump($value);
                $t = array($value['area'] => $value['areaname']);
                $options = array_merge($options, $t); 
            }
?>  </td>
     <td> <?php echo form_dropdown('areaset', $options); ?> </td>
  </tr>  

  <tr>
    <td colspan="4" align="right" > <?php echo form_submit('area', 'Select Area'); ?> </td> 
  </tr>
</table> 

<?php form_fieldset_close(); ?>
<?php form_close(); ?>
  </div> <!--contentfull-->
</div> <!--login-->

